<template>
  <BrowseDataList ref="datalist" :cols="cols" :name="name" ><template slot="search">
     <el-form-item >
        <el-input v-model="search_str"  @change="clear" @input="mysearch" placeholder="请输入教师工号或名字搜索" clearable></el-input>
      </el-form-item>
  </template>
  </BrowseDataList>
</template>
<script>
import BrowseDataList from "@/components/BrowseDataList";
import { getUser } from "@/utils/auth";
import { get教师其他情况汇总} from "@/api/教师其他情况"
import {get教师基本情况ByGH,get教师基本情况} from "@/api/教师基本情况"
import linq from "linq"
export default {
  components: {
    BrowseDataList
  },
  data() {
    return {
       search_str:'',
       name:'6.5 教师其他情况汇总',
        cols: [
        { label: "教师所属系部", prop: "BMMC" },
        { label: "教工号", prop: "GH" },
          { label: "姓名", prop: "XM"} ,
         { label: "培训进修", prop: "培训进修" ,
        data:
          [
            {label:'项目名称(全称)',prop:'PXJX_XMMC'},
            {label: "时间(天)", prop: "PXJX_SJ" },
            {label: "地点", prop: "PXJX_DD" },
            {label: "派出部门", prop: "XZ_PXJX_PCBM" }
          ]
        },{ label: "挂职锻炼(顶岗实践)", prop: "挂职锻炼",
        data:
          [
            {label:'单位名称', prop:'GZDL_DWMC'},
            { label: "岗位", prop: "GZDL_GW" },
            { label: "时间(天)", prop: "GZDL_SJ" },
            { label: "派出部门", prop: "XZ_GZDL_PCBM" }
          ]
        },  { label: "社会兼职", prop: "社会兼职" ,
        data:
          [
            { label: "单位名称(全称)", prop:"SHJZ_DWMC"},
            {label:'时间(天)', prop:'SHJZ_SJ'}
          ]
        },  { label: "获奖项目(包括行政性奖励)", prop: "获奖项目" ,
        data:
          [
            {label:'获奖日期(年月)',prop:'HJXM_HJRQ'},
            {label:'获奖名称',prop:'HJXM_HJMC'},
            { label: "级别", prop: "XZ_HJXM_JB" },
            {label:'颁奖单位',prop:'HJXM_BJDW'},
            { label: "是否主持", prop: "XZ_SFZCHJ" }
          ]
        },  { label: "获技术专利(技术发明)项目", prop: "获技术专利技术发明项目" ,
        data:
          [
            {label:'获得日期(年月)',prop:'JSZL_QDRQ'},
            { label: "技术专利(发明)名称", prop: "JSZL_MC" },
            {label:'技术专利(发明)编号',prop:'JSZL_BH'},
            { label: "是否主持", prop: "XZ_SFZCZL" }
          ]
        }, { label: "在研课题", prop: "在研课题" ,
        data:
          [
            {label:'课题性质',prop:'XZ_ZYKT_KTXZ'},
            {label:'课题分类',prop:'XZ_KTFL'},
            {label:'课题名称',prop:'ZYKT_KTMC'},
            { label: "是否横向课题", prop: "XZ_SFHXKT" },
            {label:'课题级别',prop:'XZ_ZYKT_KTJB'},
            {label:'立宪日期(年月)',prop:'ZYKT_LXRQ'},
            { label: "经费来源", prop: "ZYKT_JFLY" },
            { label: "到款金额(元)", prop: "ZYKT_DKJE" },
            { label: "完成人顺序", prop: "XZ_ZYKT_WCRSX" },
          ]
        }, { label: "公开出版著作与公开发表论文", prop: "公开出版著作与公开发表论文" ,
        data:
          [
            {label:'名称',prop:'ZZLW_MC'},
            { label: "著作与论文分类", prop: "XZ_LWFL" },
            {label:'出版社或杂志社',prop:'ZZLW_CBS'},
            { label: "出版或发表日期(年月)", prop: "ZZLW_FBRQ" },
            { label: "作者顺序", prop: "XZ_ZZLW_SMSX" }
          ]
        }
        ],

    };
  },
  methods: {

 

      async fetchData() {
        var user = getUser()

        var reslut = []
        var datas = await get教师其他情况汇总(user.XXID,user.CJPC);
        var 教师 = await get教师基本情况(user.XXID,user.CJPC)
         var param = this.$route.query.param;
    
   
        datas = linq.from(datas).join(教师,e=>e.GH,e=>e.GH,(outer,inner)=>{
        outer.教师性质=inner.教师性质;return outer}).where(`$.教师性质 === '${param.教师性质}'`).toArray();
        return datas;
    },
    
  }
};
</script>
<style>
</style>